package com.nbjtjc.safe.api;

import com.nbjtjc.safe.bean.Page;
import com.nbjtjc.safe.bean.Result;
import com.nbjtjc.safe.model.sys.SysUser;
import org.apache.shiro.SecurityUtils;

public abstract class AbstractController<T> {
    public  abstract Result delete(int id);
    public abstract Result find(T param, Page page);
    protected SysUser getUser() {
        return (SysUser) SecurityUtils.getSubject().getPrincipal();
    }

    protected Integer getUserId() {
        return getUser().getUserId();
    }
}
